// 函数组合调试

const _ = require('lodash');

const trace = _.curry((tag, val) => {
  console.log(tag, val);
  return val;
})

const split = _.curry((sep, str) => _.split(str, sep));

const join = _.curry((sep, array) => _.join(array, sep));

const map = _.curry((fn, ary) => _.map(ary, fn))

const fn1 = _.flowRight(join('-'), trace('map-toLower:'), map(_.toLower), trace('split:'), split(' '));

console.log(fn1('HELLO WORD'))
